package day_06;

/**
 * @ClassName Circle
 * @Description TODO
 * @Author hp
 * @Date 2021/6/7 20:35
 * @Version 1.0
 **/
public class Circle {
    private double radius, area;
    final static double PI = 3.14;

    public Circle(double radius) {
        this.radius = radius;
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    public double getArea() {
        return area;
    }

    public void setArea(double area) {
        this.area = area;
    }

    @Override
    public String toString() {
        return "Circle{" +
                "radius=" + radius +
                ", area=" + area +
                '}';
    }

    public double areaGet() {
        area = radius * radius * PI;
        return area;
    }


}

